package com.ecloud.trend.vo;

import com.ecloud.trend.entities.TdbTag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Squbi
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TdbPresentVo {
    private String tagNumber;
    private String tagTypeName;
    private String deviceName;
    private String buildName;
    private String tagUnit;
    private String floor;
    private String time;
    private float value;
    private int status;

    public TdbPresentVo(TdbTag tag, TrendDataVo data) {
        this.tagNumber = tag.getTagNumber();
        this.tagTypeName = tag.getTagTypeName();
        this.deviceName = tag.getDeviceName();
        this.buildName = tag.getBuildName();
        this.tagUnit = tag.getTagUnit();
        this.floor = tag.getFloor();
        this.time = data.getTime();
        this.value = data.getValue();
        this.status = data.getStatus();
    }
}
